<!doctype html>
<html lang="zh-CH">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>木投网--采购信息</title>
	<link rel="stylesheet" href="/resource/css/mt_index.css">
	<link rel="stylesheet" href="/resource/css/mt_showBo.css">
	<link rel="stylesheet" href="/resource/css/mt_now.css">
</head>
<body>
@include('common.shop_head')
<!-- 现货资源 -->
<div class="now-resource main">
	<div class="now-left left">
		<div class="title">当前位置：
			<a href="javascript:;">首页</a>&#62<a href="javascript:;">采购信息</a>
		</div>
		<div class="form-inline">
				{{ Form::open(['url'=>'select_purchase']) }}
				<div class="form-group">
					<label for="">品名：</label>
					<input type="text" class="form-control" name="title" value="">
				</div>
				<div class="form-group">
					<label for="">地区：</label>
					<input type="text" class="form-control" name="place" value="" >
				</div>
				<button type="submit" class="btn-login">搜索</button>
			{{ Form::close() }}
		</div>
		<div class="table">
			<table>
				<thead>
					<tr>
						<th width="140px">商品标题</th>
						<th width="130px">规格</th>
						<th width="170px">数量</th>
						<th width="160px">价格</th>
						<th width="120px">交货地</th>
						<th width="120px">发布时间</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
				@foreach($data as $data1)
					<tr>
						<td><div>{{$data1->title}}</div></td>
						<td><div>{{$data1->spec}}</div></td>
						<td><div>{{$data1->num}}{{$data1->unit}}</div></td>
						<td><div><span>￥{{$data1->price}}/{{$data1->unit}}</span></div></td>
						<td><div>{{$data1->place}}</div></td>
						<td><div>{{date('Y-m-d H:i:s', $data1->created);}}</div></td>
						<td>
							@if(session_get(UserEnum::USER_INFO_SESSION_KEY))
								<div class="btn-a">查看
									<ul class="hot-info">
										<li><span>联系人：</span>{{$data1->contacts}}</li>
										<li><span>电话：</span>{{$data1->tell}}</li>
										<li><span>公司：</span>{{$data1->company}}</li>
										<li><span>交货地：</span>{{$data1->address}}</li>
										<li><span>备注：</span>{{$data1->sign}}</li>
									</ul>
								</div>
							@else
								<div class="btn-a">查看</div>
								<script>
									//登录
									$('.hot-table td .btn-a').click(function(){
										$('.popup-login').show();
										$('.popup').show();
									});
								</script>
							@endif
						</td>
					</tr>

				@endforeach

			</table>
		</div>
		{{$data->appends(['title' => $title,'place'=>$place])->links()}}
		<!--<ul class="pagination">

			<li><a href="javascript:;">首页</a></li>
			<li><a href="javascript:;">&#60上一页</a></li>
			<li class="active"><a href="javascript:;">1</a></li>
			<li><a href="javascript:;">2</a></li>
			<li><a href="javascript:;">3</a></li>
			<li><a href="javascript:;">下一页 &#62</a></li>
			<li><a href="javascript:;">尾页</a></li>
		</ul>-->

	</div>
	<div class="now-right left">
		<div class="act-wrap-right">
			<div class="act-t">免费找货助手</div>
			@include('common.shop_release')
		</div>

		<div class="classify-right">
			<div class="til">推广商品</div>
			<div class="emphases-box">
				<div class="floor-shop">
					<div class="shop-img">
						<a href="javascript:;"><img src="/resource/img/floor_shop_1.png" alt=""></a>
					</div>
					<div class="shop-info">
						<a href="javascript:;" class="name"><span>实木地板</span></a>
						<div class="price">￥500.00/立方米</div>
					</div>
				</div>
				<div class="floor-shop">
					<div class="shop-img">
						<a href="javascript:;"><img src="/resource/img/floor_shop_1.png" alt=""></a>
					</div>
					<div class="shop-info">
						<a href="javascript:;" class="name"><span>实木地板</span></a>
						<div class="price">￥500.00/立方米</div>
					</div>
				</div>
				<div class="floor-shop">
					<div class="shop-img">
						<a href="javascript:;"><img src="/resource/img/floor_shop_1.png" alt=""></a>
					</div>
					<div class="shop-info">
						<a href="javascript:;" class="name"><span>实木地板</span></a>
						<div class="price">￥500.00/立方米</div>
					</div>
				</div>
				<div class="floor-shop">
					<div class="shop-img">
						<a href="javascript:;"><img src="/resource/img/floor_shop_1.png" alt=""></a>
					</div>
					<div class="shop-info">
						<a href="javascript:;" class="name"><span>实木地板</span></a>
						<div class="price">￥500.00/立方米</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
@include('common.shop_foot')

<script src="/resource/js/jquery-1.11.3.min.js"></script>
<script src="/resource/js/mt_index.js"></script>
<script src="/resource/js/mt_showBo.js"></script>  <!-- 提示信息 -->
<script>
	//导航 商品全部 隐藏显示
	var $allW = $('.all-wrap');
	$allW.hide();
	$('.nav .nav-all').attr('rel','hide');
	$('.nav .nav-all').click(function(){
		if($(this).attr('rel') == 'hide'){
			$(this).attr('rel','show');
			$allW.show();
		}else{
			$(this).attr('rel','hide');
			$allW.hide();
		};		
	});
	//登录
	$('.now-left td .btn-a').click(function(){
		loginShow();
	});
	function loginShow(){
		$('.popup-login').show();
		$('.popup').show();
	}
</script>
</body>
</html>